import svar
import cv2
import numpy as np
import time

def callback_image(image):
  #print(image)
  m= np.array(image)
  m.dtype='uint8'
  print(m.shape,m.dtype.name) # BGRA

  cv2.imshow('video', m)
  cv2.waitKey(10)

osdk=svar.load('svar_osdk')

env=osdk.LinuxSetup(True)
vehicle = env.getVehicle()

vehicle.advancedSensing.startFPVCameraStream(callback_image)
#vehicle.advancedSensing.startMainCameraStream(callback_image)


time.sleep(10)

